/*
 * @Descripttion: 调用接口公共方法
 * @version: 1.0.0
 * @Author: ouyangxuewen
 * @Date: 2020-03-26 10:20:12
 * @LastEditors: ouyangxuewen
 * @LastEditTime: 2020-03-26 10:20:12
 */
// http:162.16.2.158:8080/dbank-trunk
// directBank-trunk
// directManager-trunk
// cslive-trunk
// reslive-trunk

// http://bcs.link-us.com.cn/directBank/158/dbank-trunk
// directBank-trunk
// cslive-trunk
// reslive-trunk

const API = {
    //心意通主页
    //加挂卡心意通卡列表信息

    //心意通卡额度信息

    //心意通卡激活
    //激活心意通卡
    creditActivation: 'directBank / ryt / creditActivation.do',
    //获取短信验证码
    sendSMSCode: 'directBank / sms / v2 / sendSMSCode.do',
    //密码防重
    prepare: 'dbank / common / transfer / prepare.do',
    //设置心意通卡交易密码
    setCreditPassword: 'directBankryt / setCreditPassword.do',
    //心意通卡信息查询接口
    queryRYTDetail: 'directBank / ryt / queryRYTDetail.do',

    //申请用款
    //试算手续费&&申请用款
    applyForMoney: 'directBank / ryt / applyForMoney.do',

    //申请用款记录
    //借款信息查询
    loanMessage: 'dbank / xyt / v1 / loanMessage.do',
    //待确认申请取消与确认接口(取消、确认)
    loanConfirm: 'dbank / xyt / v1 / loanConfirm.do',

    //结清证明

    //提现
    withdrawCash: 'directBank.withdrawCash', 

//用户信息接口
pullCustInfo: 'directBank.pullCustInfo', 

    //还款
    // 本期应还信息
    rytThisPeriodBill: 'directBank / ryt / rytThisPeriodBill.do',
    // 还款
    rytRepayment: 'directBank / ryt / rytRepayment.do',
    // 查询云盾服务接口
    queryDevices: 'directBank / cloudSafekeep / queryDevices.do',

    //自动还款
    // 信用卡自动还款设置接口(查询、设置、取消)
    setAutomaticRepay: 'directBank / credit / setAutomaticRepay.do',

    // 信用卡已出账单查询接口
    multipleSelectCredit: 'directBank / credit / multipleSelectCredit.do',
    // 账单明细
    creditNoBillSelect: 'directBank / credit / creditNoBillSelect.do',
    // 未出账单查询
    creditNoBillshow: 'directBank / credit / creditNoBillshow.do',


    // 查询结构性存款所有产品接口 
    productList: 'dbank.productList',
};

//  ===============================================================
/**
 * 激活心意通卡
 * @returns {Promise}
 */
export const creditActivation = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.creditActivation, params, token, options);
};
/**
 * 获取短信验证码
 * @returns {Promise}
 */
export const sendSMSCode = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.sendSMSCode, params, token, options);
};
/**
 * 密码防重
 * @returns {Promise}
 */
export const prepare = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.prepare, params, token, options);
};
/**
 * 设置心意通卡交易密码
 * @returns {Promise}
 */
export const setCreditPassword = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.setCreditPassword, params, token, options);
};
/**
 * 心意通卡信息查询接口
 * @returns {Promise}
 */
export const queryRYTDetail = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.queryRYTDetail, params, token, options);
};
/**
 * 试算手续费&&申请用款
 * @returns {Promise}
 */
export const applyForMoney = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.applyForMoney, params, token, options);
};
/**
 * 借款信息查询
 * @returns {Promise}
 */
export const loanMessage = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.loanMessage, params, token, options);
};
/**
 * 待确认申请取消与确认接口(取消、确认)
 * @returns {Promise}
 */
export const loanConfirm = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.loanConfirm, params, token, options);
};
/**
 * 提现
 * @returns {Promise}
 */
export const withdrawCash = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.withdrawCash, params, token, options);
};
/**
 * 本期应还信息
 * @returns {Promise}
 */
export const rytThisPeriodBill = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.rytThisPeriodBill, params, token, options);
};
/**
 * 还款
 * @returns {Promise}
 */
export const rytRepayment = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.rytRepayment, params, token, options);
};
/**
 * 查询云盾服务接口
 * @returns {Promise}
 */
export const queryDevices = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.queryDevices, params, token, options);
};
/**
 * 信用卡自动还款设置接口(查询、设置、取消)
 * @returns {Promise}
 */
export const setAutomaticRepay = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.setAutomaticRepay, params, token, options);
};
/**
 * 信用卡已出账单查询接口
 * @returns {Promise}
 */
export const multipleSelectCredit = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.multipleSelectCredit, params, token, options);
};
/**
 * 账单明细
 * @returns {Promise}
 */
export const creditNoBillSelect = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.creditNoBillSelect, params, token, options);
};
/**
 * 未出账单查询
 * @returns {Promise}
 */
export const creditNoBillshow = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.creditNoBillshow, params, token, options);
};



/**
 * 获取所有产品
 * @returns {Promise}
 */
export const productList = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.productList, params, token, options);
};

/**
 * 获取所有产品
 * @returns {Promise}
 */
export const pullCustInfo = (params = {}, token = '', options = {}) => {
    return app.api.rpc(API.pullCustInfo, params, token, options);
};